<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateWechatUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //wechat_users
        Schema::create('wechat_users', function (Blueprint $table) {
            $table->increments('id');
			$table->string('openid')->default('')->comment('openid');
			$table->string('nickname')->default('')->comment('昵称');
			$table->integer('sex')->default(0)->comment('性别');
			$table->string('language')->default('zh_CN')->comment('语言');
			$table->string('city')->default('')->comment('城市');
			$table->string('province')->default('')->comment('省份');
			$table->string('country')->default('')->comment('国家');
			$table->string('headimgurl')->default('')->comment('头像');
			$table->integer('subscribe_time')->default(0)->comment('关注时间');
			$table->string('remark')->default('')->comment('备注');
			$table->integer('groupid')->default(0)->comment('分组');
			$table->integer('wallid')->default(0)->comment('微信墙ID');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
        Schema::dropIfExists('wechat_users');
    }
}
